-- GENERATED SPELL FOR [Witherbark Shadow Hunter] --


function spell0_2557(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(7646,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2557', 550, 1)
end

function spell1_2557(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2557', 18000, 1)
end

function spell2_2557(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2557', 5300, 1)
end

function Sorts_2557(pUnit, Event)
local choix_sorts_2557 = math.random(0, 2)
if choix_sorts_2557 == 0 then
pUnit:RegisterEvent('spell0_2557', 1, 1)
end
if choix_sorts_2557 == 1 then
pUnit:RegisterEvent('spell1_2557', 1, 1)
end
if choix_sorts_2557 == 2 then
pUnit:RegisterEvent('spell2_2557', 1, 1)
end
end

function mob2557_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2557', math.random(1500, 3000), 1)
end

function mob2557_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2557_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2557_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2557, 1, 'mob2557_Action')
RegisterUnitEvent(2557, 2, 'mob2557_Leave')
RegisterUnitEvent(2557, 3, 'mob2557_Kill')
RegisterUnitEvent(2557, 4, 'mob2557_Die')
